package com.situ.user.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.situ.user.bean.Goods;
import com.situ.user.mapper.GoodsMapper;
import com.situ.user.service.GoodsService;

@Service
public class GoodsServiceImpl implements GoodsService {

	@Autowired
	private GoodsMapper goodsMapper;

	@Override
	public List search(Goods goods, Integer firstSortId) {
		goods.setStatus(0);
		return goodsMapper.select(goods, firstSortId);
	}

	@Override
	public Goods getById(Integer id) {
		return goodsMapper.selectByPrimaryKey(id);
	}

}
